/*2.定义猫类
属性：年龄，颜色
行为：eat（String something）方法（something表示吃的东西）逮老鼠catchMouse方法（无参数）
package polymorphismdemo4_practice;*/
package polymorphismdemo4_practice;

public class cat extends animal {
    public cat() {

    }

    public cat(int age, String color) {
        super(age, color);
    }

    @Override
    public void eat(String something) {
        System.out.println(getAge() + "岁的" + getColor() + "颜色的猫狠狠地保住" + something + "猛吃");
    }

    public void catchMouse() {
        System.out.println("猫在抓老鼠");
    }
}
